import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios'

const fetch = axios.create({
  baseURL: 'https://www.cnnvd.org.cn/',
  timeout: 1000000000
})

fetch.interceptors.request.use((config: InternalAxiosRequestConfig) => {
  return config
})
fetch.interceptors.response.use(
  (res: AxiosResponse) => {
    return res.data
  },
  (err) => {
    console.log(err)
  }
)
export default fetch
